package com.zhou.gof.group.adapter.adapter;

import com.zhou.gof.group.adapter.mysql.Mysql;
import com.zhou.gof.group.adapter.oracle.Oracle;

/**
 * @author zhoudong
 * @title: MysqlAdapter
 * @projectName user-app
 * @description: oracle 适配器 MySQL
 * @date 2019/5/29 18:20
 */
public class OracleAdapterMysql implements Oracle {
    private Mysql mysql;

    public OracleAdapterMysql(Mysql mysql){
        this.mysql = mysql;
    }

    @Override
    public String reader() {
        System.out.println("Adapter reader");
        return mysql.reader();
    }

    @Override
    public void insert() {
        System.out.println("Adapter insert");
        mysql.insert();
    }
}
